require(['loading'], function(loading) {
	var params = getUrlParams();
	var orderId = params.orderId?params.orderId:'';

	//应用实例化
	var payOrder = new Vue({
		el: '#payOrder',
		data: {
			data: [],
			showLoading: false,
			apiUrl: wxUrl + '/v3.2/pay/topay',
			item: {
				params:{
					orderId:orderId,
					token: token,
					userToken:userToken
				}
			}
		},
		ready: function() {
			this.getPayOrderInfo();
	    },
		methods: {
			getPayOrderInfo: function() {
				this.$http.get(this.apiUrl, this.item)
					.then(function(response) {
						var result = JSON.parse(response.body);
						this.$set("data",result.data);
					},function(response) {
						//errorCallback
					});
			}
		}
	});
	
	history.pushState({}, document.title, null);
	pushVHistory(false);
	window.addEventListener("popstate", function() {
		// 跳转到订单列表页面
		goBackVHistory();
	});
});